﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class SimpleBundleCard : CardBase {

    protected override void Start()
    {
        if (string.IsNullOrEmpty(imagePath)) return;

        AVProVideoPlayerMgr.Instance.Stop();

        if (imagePath.EndsWith(".png"))
        {
            FlipUVY = false;
            CutOut = false;
            Texture tex = PaperManager.Instance.GetAssetFromCurrentAssetBundle(imagePath) as Texture;
            tex.filterMode = FilterMode.Trilinear;
            Render.material.mainTexture = tex;
            FixSize(new Vector2(tex.width, tex.height));
            lastTex = tex;
        }
        //else if (assetname.EndsWith(".mp4"))
        //{
        //    PlayVideo(assetname);
        //}
    }

    protected override void FixedUpdate()
    {
        base.FixedUpdate();
    }

    protected override void ReleaseResouces()
    {
        
    }
}
